<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

$admin_api = 'Admin';
Route::post("api/$admin_api/system/config", [\App\Http\Controllers\ConfigController::class, 'config']);
Route::post("api/$admin_api/system/update", [\App\Http\Controllers\ConfigController::class, 'update']);
Route::post("api/$admin_api/system/assets/list", [\App\Http\Controllers\ConfigController::class, 'assets_list']);

Route::post("api/$admin_api/auth/select", [\App\Http\Controllers\AdminAuthController::class, 'all']);
Route::post("api/$admin_api/auth/all", [\App\Http\Controllers\AuthController::class, 'list']);
Route::post("api/$admin_api/change/nickname", [\App\Http\Controllers\AdminController::class, 'change_nickname']);
Route::post("api/$admin_api/change/password", [\App\Http\Controllers\AdminController::class, 'change_password']);
Route::post("api/$admin_api/auth/check", [\App\Http\Controllers\AdminAuthController::class, 'check']);

Route::post("api/$admin_api/menu", [\App\Http\Controllers\AdminAuthController::class, 'menu']);
Route::post("api/$admin_api/get/info", [\App\Http\Controllers\AdminController::class, 'admin_info']);
Route::post("api/$admin_api/list", [\App\Http\Controllers\AdminController::class, 'list']);
Route::post("api/$admin_api/delete", [\App\Http\Controllers\AdminController::class, 'delete']);
Route::post("api/$admin_api/update/password", [\App\Http\Controllers\AdminController::class, 'update_password']);
Route::post("api/$admin_api/update/status", [\App\Http\Controllers\AdminController::class, 'update_status']);
Route::post("api/$admin_api/update/auth", [\App\Http\Controllers\AdminController::class, 'update_auth']);
Route::post("api/$admin_api/update/nickname", [\App\Http\Controllers\AdminController::class, 'update_nickname']);
Route::post("api/$admin_api/create", [\App\Http\Controllers\AdminController::class, 'create']);

Route::post("api/$admin_api/auth/list", [\App\Http\Controllers\AdminAuthController::class, 'list']);
Route::post("api/$admin_api/auth/delete", [\App\Http\Controllers\AdminAuthController::class, 'delete']);
Route::post("api/$admin_api/auth/update", [\App\Http\Controllers\AdminAuthController::class, 'update']);
Route::post("api/$admin_api/auth/create", [\App\Http\Controllers\AdminAuthController::class, 'create']);

Route::post("api/$admin_api/info", [\App\Http\Controllers\AdminController::class, 'info']);
Route::post("api/$admin_api/status", [\App\Http\Controllers\AdminController::class, 'status']);
Route::post("api/$admin_api/login", [\App\Http\Controllers\AdminController::class, 'admin_login']);

Route::get('/', function () {
    return view('welcome');
});

Route::post('api/yo', \App\Http\Controllers\YoController::class);
